%option noyywrap

%{
#include <stdio.h>
%}

int [0-9]+
float [0-9]+\.[0-9]+
id [a-zA-Z_][0-9a-zA-Z_]*
blank [ \t\n\r]

%%

"+"         { printf("PCT_ADD\n"); }
"-"         { printf("PCT_SUB\n"); }
"*"         { printf("PCT_MULT\n"); }
"/"         { printf("PCT_DIV\n"); }
"("         { printf("PCT_PARENTHESE_L\n"); }
")"         { printf("PCT_PARENTHESE_R\n"); }
","         { printf("PCT_COMMA\n"); }
{int}       { printf("INT\n"); }
{float}     { printf("FLOAT\n"); }
{id}        { printf("ID\n"); }
{blank}     {}
.           { printf("unknown! : %s\n", yytext); }

%%

int main() {
    yylex();
    return 0;
}

